<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>01.APP基本信息表列表</title>
<link href="../../static/plugin/easyui/themes/bootstrap/easyui.css"
	rel="stylesheet" type="text/css" />
<link href="../../static/plugin/easyui/themes/icon.css" rel="stylesheet"
	type="text/css" />
<script src="../../static/plugin/easyui/jquery.min.js"
	type="text/javascript"></script>
<script src="../../static/plugin/easyui/jquery.easyui.min.js"
	type="text/javascript" charset="utf-8"></script>
<script src="../../static/plugin/easyui/locale/easyui-lang-zh_CN.js"
	type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js"
	type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js"
	type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js"
	type="text/javascript"></script>
<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<script type="text/javascript">
	function doAdd() {
		JLEUtil.createModalWin('新增', 'AppBaseInfoAdd.html');
	}

	function doUpdate() {
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			JLEUtil.createModalWin('修改', 'AppBaseInfoUpdate.html?' + 'appId='
					+ row.appId);
		} else {
			$.messager.alert('提示', '请选择一条记录！', 'info');
		}
	}

	function doDelete() {
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			$.messager.confirm('删除提示', '你确定要删除这条记录?', function(r) {
				if (r) {
					var jsonData = JSON.parse('{' + '"appId":"' + row.appId
							+ '"' + '}');
					$.restfulDelete('../../api/app/base/info', jsonData,
							function(data) {
								$.messager.alert('提示', '记录删除成功!', 'info');
								$('#dg').datagrid('reload');
							});
				}
			});
		} else {
			$.messager.alert('提示', '请选择一条记录！', 'info');
		}
	}

	function doView() {
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			JLEUtil.createModalWin('详情', 'AppBaseInfoView.html?' + '&appId='
					+ row.appId);
		} else {
			$.messager.alert('提示', '请选择一条记录！', 'info');
		}
	}

	function reloadList() {
		$('#dg').datagrid('reload');
		JLEUtil.closewin();
	};
</script>
</head>
<body class="easyui-layout">
	<div data-options="region:'north',title:''"
		style="height: 40px; background: #F4F4F4;">
		<form id="searchForm">
			<table>
				<tr>
					<td>&nbsp;应用标识：</td>
					<td><input name="appId" id="appId" /></td>
					<td>&nbsp;应用名称：</td>
					<td><input name="appName" id="appName" /></td>
					<td><a class="easyui-linkbutton" href="javascript:void(0);"
						onclick="JLEUtil.queryForm('searchForm','dg','../../api/app/base/infos');">查找</a></td>
					<td><a class="easyui-linkbutton" href="javascript:void(0);"
						onclick="JLEUtil.clearForm('searchForm');">清空</a></td>
				</tr>
			</table>
		</form>
	</div>
	<div data-options="region:'center',split:false">
		<table id="dg" class="easyui-datagrid" title=""
			style="width: 100%; height: 100%"
			data-options="singleSelect:true,collapsible:true,url:'../../api/app/base/infos',method:'post'"
			toolbar="#tb" title="Load Data" rownumbers="true" pagination="true"
			pageSize="20">
			<thead>
				<tr>
					<th data-options="field:'appId',resizable:true">应用标识</th>
					<th data-options="field:'appName',resizable:true">应用名称</th>
					<th data-options="field:'appVersionId',resizable:true">当前版本号</th>
					<th data-options="field:'appVersionDate',resizable:true">版本发布日期</th>
					<th data-options="field:'appState',resizable:true" formatter="formatter_APP_USER_STATE">应用状态</th>
					<th data-options="field:'remarks',resizable:true">备注</th>
					<th data-options="field:'iosCount',resizable:true">IOS激活量</th>
					<th data-options="field:'andriodCount',resizable:true">ANDRIOD激活量</th>
					<th data-options="field:'shareAppId',resizable:true">认证及授权共享</th>
					<th data-options="field:'appProjectAtate',resizable:true">应用工程状态</th>
					<th data-options="field:'appProjectDate',resizable:true">应用工程日期</th>
					<th data-options="field:'appProjectUrl',resizable:true">应用工程地址</th>
					<th data-options="field:'appType',resizable:true" formatter="formatter_APP_TYPE">应用类型</th>
				</tr>
			</thead>
		</table>
	</div>
	<div id="tb" style="padding: 1px">
		<div style="margin-bottom: 2px">
			<a href="javascript:doAdd()" class="easyui-linkbutton"
				iconCls="icon-add" plain="true">创建应用</a> <a
				href="javascript:doUpdate()" class="easyui-linkbutton"
				iconCls="icon-edit" plain="true">修改应用</a> <a
				href="javascript:doDelete()" class="easyui-linkbutton"
				iconCls="icon-remove" plain="true">删除应用</a> <a
				href="javascript:doView()" class="easyui-linkbutton"
				iconCls="icon-ok" plain="true">查看应用</a>
				<a href="javascript:doView()" class="easyui-linkbutton" 
				iconCls="icon-edit" plain="true">应用开发管理</a>
				<a href="javascript:doView()" class="easyui-linkbutton" 
				iconCls="icon-edit" plain="true">应用配置管理</a>
				<a href="javascript:doView()" class="easyui-linkbutton" 
				iconCls="icon-edit" plain="true">复制应用配置</a>
				<a href="javascript:doView()" class="easyui-linkbutton" 
				iconCls="icon-edit" plain="true">应用运营分析</a>
		</div>
	</div>
</body>
</html>
